package cc.bookcloud.tool.ocr.common.git;



import java.util.ArrayList;
import java.util.List;

/**
 * @Desc: 提交记录
 * @Version: 2.0
 * @Author: John Goo
 * @Date: 2022/11/15 14:54
 **/

public class JCommitRecord {
    // 提交记录ID
    private String commitId;
    // 作者
    private String author;
    // 日期
    private String date;
    // 备注
    private String remark;

    // 选中状态
    private Boolean selected = false;
    // 提交详情
    private List<RecordLine> lines = new ArrayList<>();

    public void setLines(List<RecordLine> lines) {
        this.lines = lines;
    }

    public List<RecordLine> getLines() {
        return lines;
    }

    public void addLine(RecordLine recordLine){
        lines.add(recordLine);
    }

    public String getCommitId() {
        return commitId;
    }

    public void setCommitId(String commitId) {
        this.commitId = commitId;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    /*public static void main(String[] args) {
        String fileLine = " bifrost-service/bifrost-basic/basic-service/src/main/java/com/szjz/cloud/bifrost/basic/application/service/template/BasExpCriDetailAsvcImpl.java | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++";
        if(fileLine.contains("bifrost")){
            JCommitDetailLine commitDetailLine = new JCommitDetailLine();
            String constStr = "com/szjz/cloud/";
            int index = fileLine.indexOf(constStr);
            int len = constStr.length() + index;
            String fullPath = fileLine.substring(0, len);
            System.out.println("fullPath = " + fullPath);
            String codePath = fileLine.substring(len);
            codePath = codePath.substring(0,codePath.indexOf("|"));
            System.out.println("codePath = " + codePath);

        }
    }*/
}
